﻿using ShoppingEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IShoppingBll
{
    public interface IRoleInfoBll : IBaseDeleteBll<RoleInfo>
	{
		//更新角色信息
		bool UpdateRoleInfo(string roleInfoId, string RoleName, string Describe);
		/// <summary>
		/// 判断是否有相同角色名
		/// </summary>
		/// <param name="roleName"></param>
		/// <returns></returns>
		bool IsHadRoleInfo(string roleName);


		/// <summary>
		/// 角色数据集显示(分页)
		/// </summary>
		/// <param name="page"></param>
		/// <param name="limit"></param>
		/// <param name="count"></param>
		/// <param name="RoleName"></param>
		/// <param name="Rescription"></param>
		/// <returns></returns>
		object GetRoleInfoByPage(int page, int limit, out int count, string RoleName);


		/// <summary>
		/// 绑定用户
		/// </summary>
		/// <param name="roleInfoId"></param>
		/// <param name="userInfoIds"></param>
		void BinUserInfo(string roleInfoId, List<string> userInfoIds);


		/// <summary>
		/// 获取当前角色已绑定的用户id集合
		/// </summary>
		/// <param name="roleInfoId"></param>
		/// <returns></returns>
		List<string> GetBindUserIds(string roleInfoId);


		/// <summary>
		/// 获取当前角色已绑定的菜单id集合
		/// </summary>
		/// <param name="roleInfoId"></param>
		/// <returns></returns>
		List<string> GetBindMenuIds(string roleInfoId);


		/// <summary>
		/// 绑定菜单
		/// </summary>
		/// <param name="roleInfoId"></param>
		/// <param name="menuInfoIds"></param>
		void BindMenuInfo(string roleInfoId, List<string> menuInfoIds);


		/// <summary>
		/// 删除角色
		/// </summary>
		/// <param name="roleInfoId"></param>
		/// <returns></returns>
		bool DeleteRoleInfo(string roleInfoId);

	}


}
